package proxy.dynamicProxy;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

public class GuitaiA implements InvocationHandler {

    Object brand;
    String name;
    public GuitaiA(Object brand,String name) {
        this.brand = brand;
        this.name = name;
    }

    @Override
    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
        System.out.println("销售开始  柜台是： "+name+"-"+method.getName());
        System.out.println("args = " + args);
        method.invoke(brand, args);
        System.out.println("销售结束");
        return null;
    }

}
